certificate as follows:
Ll keys/
We can see that three files, ilanni. csr, ilanni. crt, and ilanni. key, have been generated. Here, we use the ilanni. crt and ilanni. key Files.
In this way, the Client certificate is created.
4. Configure the Server
After all the certificates are created, we now start to configure the Server. Server configuration file, wh
certificate request
A challenge password []:
An optional company name []:4. 3. Copy the certificate to the corresponding location
# Cd, usr, local, openvpn, easy-rsa, 2.0, and keys
# Cp-f dh2048.pem ca. crt server. crt server. key/usr/local/openvpn/keys # (server side)
# Cp
OpenVPN server configuration file description (transfer), openvpn configuration file
This article describes how to configure the configuration file on the OpenVPN server. In Windows, this configuration file is generally called server
Security Group.
10. Configure the OpenVPN ClientCopy the certificate generated by the server to one place. For example, for rainbow users:# Mkdir-p/home/rainbow/tmp/openvpn_heylinux# Cd/home/rainbow/tmp/openvpn_heylinux# Cp-rpa/etc/openvpn/easy-rsa/2.0/keys/ta. key.# Cp-rpa/etc/openvpn/easy-rsa/2.0/keys/ca. crt.# Cp-r
are generated in the keys directory.
./Build-dh
# Generate the Diffie-Hellman file for encryption. The dh1024.pem file will be generated in the keys directory.
./Build-key-server xuyou
# Generate the server certificate and key file. You only need to enter y in the last two places. xuyou. crt xuyou. csr xuyou. key is generated in the keys directory.
Copy the generated
xuyou
# Generate the server certificate and key file. You only need to enter y in the last two places. xuyou. crt xuyou. csr xuyou. key is generated in the keys directory.
VcD4KPHA + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20140905/2014090509150260.png" alt = "\">
Copy the generated server-side ca certificate and key file to/etc/openvpn/
Cp
such as winscp.
6. create a server configuration fileDecompress the source code and copy the standard configuration file in the directory.Mkdir/etc/openvpn/easy-rsa/2.0/conf/Cp/tmp/openvpn-2.2.2/sample-config-files/server. conf/etc/open
-TunStatus openvpn-status.logVerb 3-------------- Cut here -----------------Place the configuration file in the c: \ Program Files \ openvpn \ config \ directory.Set ca. CRT server01.crt server01.key ta. Key dh1024.pem under easy-RSA \ keys \.Copy to the directory where server01.ovpn is located.Server configuration has ended. You can start the
, ESTABLISHED-j ACCEPT
-A input-s 10.8.0.0/24-j ACCEPT
-A input-p tcp-m state -- state NEW-m tcp -- dport 22-j ACCEPT
-A input-p tcp-m state -- state NEW-m tcp -- dport 1194-j ACCEPT
-A input-p udp-m state -- state NEW-m udp -- dport 1194-j ACCEPT
-A input-I tun +-j ACCEPT
-A forward-d 10.8.0.0/24-j ACCEPT
-A forward-I tun +-j ACCEPT
-A input-j DROP
COMMIT
# Completed on Tue May 5 11:25:43 2015
Taking windows as an example:
Client operation steps:
Download windows client:
Http://openvpn.ustc.ed
will be hosted to ensure that each customer's key identifier is unique.
Sudo. /etc/openvpn/easy-rsa/2.0/build-key Client
Move the file server certificate and key to the/etc/openvpn directory. Replace the server. CRT and server. The file name that is used primarily.
sudo
One, OpenVPN server-side configuration file details
################################################## Example of a server-side configuration file for OpenVPN 2.0 for multiple clients## This file is used for multi-client ## OpenVPN also supports stand-alone ## This configur
network IP, because my server is a local area network of a machine, only LAN IP, So here is the IP of this machine.
If you do not add a iptables rule, the result is that you can connect to the VPN server but not the Internet. Additional rules that may be required are as follows:
Iptables-a forward-i tun0-s 10.1.1.0/24-j ACCEPTIptables-a forward-i eth0-d 10.1.1.0/24-j ACCEPTIptables-i input-p TCP--dport 1
content of/usr/share/easy-rsa/2.0/keys/ca. crt in thisCopy and paste all the content of/usr/share/easy-rsa/2.0/keys/ta. keyDownload client from the server. ovpn, and copy it to the config directory of the openvpn installation directory. Finally, start the openvpn program and connect to the
easy-rsa3
Generate Certificate
# Configuration file directories are generally in a similar directory cp/usr/share/doc/openvpn-2.3.6/sample-config-files/server. conf/etc/openvpn/#2.3 needs to download an easy-rsa package independently. This package is used to create ca certificates and
pkcs11_pin=1234[Root@vpnserver 2.0]# Source VARsNote:if you run./clean-all, I'll be doing a rm-rf On/byrd/tools/openvpn-2.2.2/easy-rsa/2.0/keys[Root@vpnserver 2.0]#./clean-all[Root@vpnserver 2.0]# Ll/byrd/tools/openvpn-2.2.2/easy-rsa/2.0/keysTotal 4-rw-r--r--. 1 Root 0 Mar 9 13:00 index.txt-rw-r--r--. 1 Root 3 Mar 9 13:00 serial[Root@vpnserver 2.0]#./build-caCountry Name (2 letter code) [CN]:State or provi
Details of the Linux neighbor subsystem: confirm-OpenVPN server mode MAC address learning, confirm-openvpnmacIn the article parsing the aging time principle of ARP cache implemented by Linux, I analyzed the conversion of the neighbor subsystem of IPv4 on the Linux protocol stack and again pasted the state machine Conversion Diagram, but this figure is more detailed, because it has an external input, that is
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.